/**
 *
 */
package com.firmye.codegenerator.model;

import lombok.Data;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * @Author Firmye
 * @Date 2017年12月31日 下午2:46:11
 * @Description
 */
@Data
public class DataModel {

    private String packageName;
    private Set<String> imports;
    private List<String> annotations;
    private String className;
    private String superClassName;
    private List<String> interfaces;
    private List<Field> fields;
    private List<Method> methods;
    private String classFullName;
    private Boolean toString;

    public void addImport(String str) {
        imports.add(str);
    }

    public void addAnno(String str) {
        annotations.add(str);
    }

    public void addInterface(String str) {
        interfaces.add(str);
    }

    public void addField(Field field) {
        fields.add(field);
    }

    public void addMethod(Method method) {
        methods.add(method);
    }

    public DataModel() {
        imports = new HashSet();
        annotations = new ArrayList();
        interfaces = new ArrayList();
        fields = new ArrayList();
        methods = new ArrayList();
    }

    public String getClassFullName() {
        classFullName = packageName + "." + className;
        return classFullName;
    }

}
